package com.cm.study.spring.cyclic.di;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

@Service
public class Service1 {
    private Service2 service2;
    @Autowired
    public Service1(@Lazy Service2 service2){
        this.service2 = service2;
    }

    public void executeService2(){
        System.out.println("执行了service2方法");
    }
}
